package tom.spring.cloud.integration.receiver;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.integration.annotation.ServiceActivator;

/**
 * 使用spring-integration注解.
 * 使用的是Sink作为binding，input，接收来自my-topic02的消息
 * @author ZHUFEIFEI
 */
@Slf4j
@EnableBinding({Sink.class})
public class Receiver01 {

    @ServiceActivator(inputChannel = Sink.INPUT)
    public void receive(Object payload) {
        log.info("receive01: {}", payload);
    }

}
